package com.red.wood.util;

import java.io.File;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        try {
        	//String path = Main.class.getResource("/ipiptest.ipdb").getPath();
            String path = "D:"+File.separator+"ipiptest.ipdb";
        	Reader db = new Reader(path);
        	System.out.println(db.find("110.53.228.144", "CN")[1]);
           // System.out.println(db.getBuildUTCTime());
          //  System.out.println(Arrays.toString(db.getSupportFields()));
           // System.out.println(Arrays.toString(db.find("119.29.77.175", "CN")));
//            System.out.println(Arrays.toString(db.find("1.1.1.1", "CN")));
//            System.out.println(Arrays.toString(db.find("255.255.255.255", "CN")));
          //  System.out.println(Arrays.toString(db.find("2001:250:200::", "CN")));

//            Long now = System.nanoTime();

//            for (int i = 0; i < 1000000; i++) {
//                db.find("8.8.8.8", "CN");
//            }

//            System.out.println((System.nanoTime() - now) / 1000/ 1000);

        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
